package com;

import com.gui.MainPanel;
import java.io.FileOutputStream;
import java.io.PrintStream;
import javax.swing.JFrame;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;

/**
 * @author Dmitry
 */
public class CsvSaver {

    public static void main(String[] args) throws Exception {
        System.setOut(new PrintStream(new FileOutputStream("./out.txt",true)));
        System.setErr(new PrintStream(new FileOutputStream("./err.txt",true)));
        UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
        SwingUtilities.invokeLater(new Runnable() {
            @Override
            public void run() {
                JFrame frame = new JFrame();
                frame.setTitle("Barcode processor");
                MainPanel dialog = new MainPanel();
                frame.add(dialog);
                frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                frame.pack();
                frame.setLocationRelativeTo(null);
                frame.setVisible(true);
            }
        });
    }
}
